package com.cxb.supplier.controller;

import com.cxb.FeignTest;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Log4j2
@RestController
@RequestMapping(FeignTest.PATH)
public class FeignTestImpl implements FeignTest, ApplicationContextAware {
    @Override
    public void test() {
        log.info("进入test方法");
    }

    @Override
    public void demo2() {

    }

    @Override
    public void demo_3() {

    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("applicationContext");
        applicationContext.getBean("feignTestImpl");
    }
}
